﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Phatent.Model.Results
{
    [DataContract]
    public class JsonEntity<T> where T : MBase
    {
        [DataMember]
        public T Data { get; set; }
        [DataMember]
        public string Message { get; set; }
        [DataMember]
        public bool Success { get; set; }

        public JsonEntity(T data, string message = null, bool success = true)
        {
            this.Data = data;
            this.Message = message;
            this.Success = success;
        }
    }
}
